package com.example.appdemo1.controller;

import com.example.appdemo1.entity.Page;
import com.example.appdemo1.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ShopController {
    @Autowired
    private ShopService shopService;
    @RequestMapping(value = "/shop/{currPage}/{pageSize}",method = RequestMethod.POST)
    public Page findShopByPage(@PathVariable("currPage") int currPage,@PathVariable("pageSize") int pageSize){
        return shopService.findShopByPage(currPage,pageSize);
    }
}
